# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.WorkloadManager.V1.Model.SqlserverValidation do
  @moduledoc """
  A presentation of SQLServer workload insight. The schema of SqlServer workloads validation related data.

  ## Attributes

  *   `agentVersion` (*type:* `String.t`, *default:* `nil`) - Optional. The agent version collected this data point
  *   `instance` (*type:* `String.t`, *default:* `nil`) - Required. The instance_name of the instance that the Insight data comes from. According to https://linter.aip.dev/122/name-suffix: field names should not use the _name suffix unless the field would be ambiguous without it.
  *   `projectId` (*type:* `String.t`, *default:* `nil`) - Required. The project_id of the cloud project that the Insight data comes from.
  *   `validationDetails` (*type:* `list(GoogleApi.WorkloadManager.V1.Model.SqlserverValidationValidationDetail.t)`, *default:* `nil`) - Optional. A list of SqlServer validation metrics data.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :agentVersion => String.t() | nil,
          :instance => String.t() | nil,
          :projectId => String.t() | nil,
          :validationDetails =>
            list(GoogleApi.WorkloadManager.V1.Model.SqlserverValidationValidationDetail.t()) | nil
        }

  field(:agentVersion)
  field(:instance)
  field(:projectId)

  field(:validationDetails,
    as: GoogleApi.WorkloadManager.V1.Model.SqlserverValidationValidationDetail,
    type: :list
  )
end

defimpl Poison.Decoder, for: GoogleApi.WorkloadManager.V1.Model.SqlserverValidation do
  def decode(value, options) do
    GoogleApi.WorkloadManager.V1.Model.SqlserverValidation.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.WorkloadManager.V1.Model.SqlserverValidation do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
